<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Blorb Errors</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Blorb Errors' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="index.html">inblorb</a></li><li><a href="index.html#1">Chapter 1: Blurbs</a></li><li><b>Blorb Errors</b></li></ul></div>
<p class="purpose">To spool error messages into the HTML report.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Foundation has a perfectly good library of code for error messages, but
we won't use it, because we need to do something unusual with them: they
must not only be printed to standard error, but also spooled into HTML
format for possible use on a status HTML page. Hence this section.
</p>

<p class="commentary">Inblorb is in any case only minimally helpful when diagnosing problems,
because it's intended to be used as the back end of a system which only
generates correct blurb files, so that everything will work &mdash; ideally, the
Inform user will never know that Inblorb exists.
</p>

<p class="commentary">First, the current position of errors is recorded so that we can report
the source of the trouble:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">text_file_position</span><span class="plain-syntax"> *</span><span class="identifier-syntax">error_position</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::set_error_position</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::set_error_position</span></span>:<br/>Blurb Parser - <a href="1-bp.html#SP1">&#167;1</a>, <a href="1-bp.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">text_file_position</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tfp</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">error_position</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tfp</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::describe_file_position</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::describe_file_position</span></span>:<br/><a href="1-be.html#SP2">&#167;2</a>, <a href="1-be.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">OUTPUT_STREAM</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">error_position</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%f, line %d: "</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">error_position</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">text_file_filename</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">error_position</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">line_count</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>Fatalities:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::fatal</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::fatal</span></span>:<br/>Blurb Parser - <a href="1-bp.html#SP7_2">&#167;7.2</a><br/>Blorb Writer - <a href="2-bw.html#SP8">&#167;8</a>, <a href="2-bw.html#SP17">&#167;17</a>, <a href="2-bw.html#SP19">&#167;19</a>, <a href="2-bw.html#SP21">&#167;21</a>, <a href="2-bw.html#SP23">&#167;23</a><br/>Website Maker - <a href="3-wm.html#SP9">&#167;9</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Fatal error: %s\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-mn.html#SP7" class="function-link"><span class="function-syntax">Main::print_report</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">exit</span><span class="plain-syntax">(1);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::fatal_fs</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::fatal_fs</span></span>:<br/>Blorb Writer - <a href="2-bw.html#SP26_3_1">&#167;26.3.1</a><br/>Solution Deviser - <a href="3-sd.html#SP12">&#167;12</a><br/>Base64 - <a href="3-bs6.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">fn</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Fatal error: %s: filename '%f'\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">fn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-mn.html#SP7" class="function-link"><span class="function-syntax">Main::print_report</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">exit</span><span class="plain-syntax">(1);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Mere indispositions:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::error</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::error</span></span>:<br/>Solution Deviser - <a href="3-sd.html#SP3">&#167;3</a>, <a href="3-sd.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Error: %s\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::error_1</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::error_1</span></span>:<br/>Blurb Parser - <a href="1-bp.html#SP7_1">&#167;7.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Error: %s: '%s'\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::error_1S</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::error_1S</span></span>:<br/>Blurb Parser - <a href="1-bp.html#SP7_1">&#167;7.1</a>, <a href="1-bp.html#SP7_2">&#167;7.2</a><br/>Releaser - <a href="3-rls.html#SP6_7">&#167;6.7</a>, <a href="3-rls.html#SP9">&#167;9</a><br/>Placeholders - <a href="3-plc.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Error: %s: '%S'\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::error_1f</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::error_1f</span></span>:<br/>Blorb Writer - <a href="2-bw.html#SP17">&#167;17</a>, <a href="2-bw.html#SP19">&#167;19</a>, <a href="2-bw.html#SP24">&#167;24</a><br/>Website Maker - <a href="3-wm.html#SP9">&#167;9</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">filename</span><span class="plain-syntax"> *</span><span class="identifier-syntax">F</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP1" class="function-link"><span class="function-syntax">BlorbErrors::describe_file_position</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="string-syntax">"Error: %s: '%f'\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::errorf_1S</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::errorf_1S</span></span>:<br/>Releaser - <a href="3-rls.html#SP6_4">&#167;6.4</a><br/>Templates - <a href="3-tmp.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">s1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::errorf_2S</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::errorf_2S</span></span>:<br/>Releaser - <a href="3-rls.html#SP8_2_1">&#167;8.2.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s1</span><span class="plain-syntax">, </span><span class="reserved-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">s2</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">, </span><span class="identifier-syntax">erm</span><span class="plain-syntax">, </span><span class="identifier-syntax">s1</span><span class="plain-syntax">, </span><span class="identifier-syntax">s2</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="1-be.html#SP4" class="function-link"><span class="function-syntax">BlorbErrors::spool_error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">ERM</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>As noted, errors are spooled to a placeholder variable, for the benefit of
the report:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">BlorbErrors::spool_error</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">BlorbErrors::spool_error</span></span>:<br/><a href="1-be.html#SP2">&#167;2</a>, <a href="1-be.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">OUTPUT_STREAM</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::append_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"CBLORBERRORS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"&lt;li&gt;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::append_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"CBLORBERRORS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-plc.html#SP5" class="function-link"><span class="function-syntax">Placeholders::append_to</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"CBLORBERRORS"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"&lt;/li&gt;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">STREAM_COPY</span><span class="plain-syntax">(</span><span class="constant-syntax">STDERR</span><span class="plain-syntax">, </span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">error_count</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="1-mn.html">&#10094;</a></li><li class="progresschapter"><a href="M-ui.html">M</a></li><li class="progresscurrentchapter">1</li><li class="progresssection"><a href="1-bsc.html">bsc</a></li><li class="progresssection"><a href="1-mn.html">mn</a></li><li class="progresscurrent">be</li><li class="progresssection"><a href="1-bp.html">bp</a></li><li class="progresschapter"><a href="2-bw.html">2</a></li><li class="progresschapter"><a href="3-rls.html">3</a></li><li class="progressnext"><a href="1-bp.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

